package com.graduation.rescuematerial.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.graduation.rescuematerial.dto.DropDownBoxDTO;
import com.graduation.rescuematerial.dto.StatisticsDTO;
import com.graduation.rescuematerial.dto.SysCompanyDTO;
import com.graduation.rescuematerial.dto.WarehouseDTO;
import com.graduation.rescuematerial.pojo.Company;
import com.graduation.rescuematerial.vo.CommonCompanyVo;
import com.graduation.rescuematerial.vo.CompanyUnionQueryVo;
import com.graduation.rescuematerial.vo.UpdateCompanyVo;
import com.graduation.rescuematerial.vo.WarehouseInfoVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author CaiShuangLian
 * @since 2022-04-11
 */
@Mapper
public interface CompanyMapper extends BaseMapper<Company> {


    //无条件返回所有部门（用于系统管理员查看信息）
    List<CommonCompanyVo> getAll();

    //根据类型返回部门信息（用于公开信息展示其余部门查看信息）
    List<CommonCompanyVo> getCompanyByType(String type);

    //返回附件仓库
    List<WarehouseDTO> getWarehouse(WarehouseInfoVo warehouseInfoVo);

    //添加部门
    Integer addOne(Company company);

    //根据名称返回部门信息（精确查询）
    Company getCompanyByName(String companyName);

    //系统管理员查看信息
    List<SysCompanyDTO> getSysCompany();

    //修改信息
    int updateCompany(UpdateCompanyVo updateCompanyVo);

    List<SysCompanyDTO> getAllCompanyByType(String type);

    List<SysCompanyDTO> unionQuery(CompanyUnionQueryVo companyUnionQueryVo);

    List<DropDownBoxDTO> companyDropDownBox();

    List<StatisticsDTO> getUserStatistics();
}
